package br.com.sipsoft.svola.entidades;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name="TBMANAD_K300")
public class ManadK300 extends BaseEntity {

	@Id
	@Column(name="MANADK300_ID")
	@SequenceGenerator(name="MANADK300_SEQ", allocationSize = 1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE)
	private @Getter @Setter Long id;
	
	@ManyToOne
	@JoinColumn(name="TIPO_REGISTRO_ID")
	private @Getter @Setter ManadTipoRegistro manadTipoRegistro;
	
	@Column(name="CNPJ")
	private @Getter @Setter String cnpj;
	
	@Column(name="IND_FL")
	private @Getter @Setter Long indicadorTipoFolha;
	
	@Column(name="COD_LTC")
	private @Getter @Setter String codigoLotacao;
	
	@Column(name="COD_REG_TRAB")
	private @Getter @Setter String codigoRegistroTrabalhador;
	
	@Column(name="DT_COMP")
	private @Getter @Setter Date dataCampoPeriodo;
	
	@Column(name="COD_RUBRICA")
	private @Getter @Setter String codigoRublica;
	
	@Column(name="VL_PROV_DESC")
	private @Getter @Setter Double valorRubrica;
	
	@Column(name="IND_PROV_DESC")
	private @Getter @Setter String indicacaoProventoDesconto;
	
	@Column(name="IND_BASE_IRRF")
	private @Getter @Setter Long indicadorBaseCalculoImpostoRendaIRRF;
	
	@Column(name="IND_BASE_PS")
	private @Getter @Setter Long indicadorBaseCalculoPrevidenciaSocial;
	
	@Override
	public void save() throws Exception {
		hibernateUtils.saveWithoutSession(this);
	}
	
}
